package uw10.app.display;

import android.graphics.Color;

public class RatingColorFactory
{
	private int maxRating;
	
	public RatingColorFactory(int maxRating)
	{
		this.maxRating = maxRating;
	}
	
	public int getColor(int rating)
	{
		float r = (float)(rating) / maxRating;
		
		return Color.rgb((int)(r * 200) + 55, (int)(180 * (1-r*r*r)), (int)(55 * (1-r)));
	}
}
